package com.rs.game.player.dialogues;

import com.rs.game.player.content.PlayerLook;

public class MyAccount extends Dialogue {

	@Override
	public void start() {
		if (player.isDonator()) {
			sendOptionsDialogue("My Account", "Change Look", "Change Gender", "Change Hair", "See blackmarks", "More...");
		} else {
			sendOptionsDialogue("My Account", "Change Look", "Change Gender", "Change Hair", "See blackmarks", "Cancel");
		}
	}

	@Override
	public void run(int interfaceId, int componentId) {
		switch (stage) {
		case -1:
			switch (componentId) {
			case OPTION_1:
				if (player.getEquipment().wearingArmour()) {
					player.getPackets().sendGameMessage("You can't wear armour to perform this.");
					end();
				} else {
					PlayerLook.openThessaliasMakeOver(player);
					end();
				}
				break;
			case OPTION_2:
				PlayerLook.openMageMakeOver(player);
				end();
				break;
			case OPTION_3:
				if (player.getEquipment().wearingArmour()) {
					player.getPackets().sendGameMessage("You can't wear armour to perform this.");
					end();
				} else {
					PlayerLook.openHairdresserSalon(player);
					end();
				}
				break;
			case OPTION_4:
				player.getPackets().sendGameMessage("You currently have <col=FF0000>" + player.getBlackmarks() + "</col> out of a possible <col=FF0000>10</col>");
				end();
				break;
			case OPTION_5:
				if (player.isDonator()) {
					sendOptionsDialogue("My Account", "Change Resting Animation", "Cancel");
					stage = 0;
				} else {
					end();
				}
				break;
			}
			break;
		case 0:
			switch (componentId) {
			case OPTION_1:
				if (player.isResting()) {
					end();
				} else {
					if (player.isDonator() && !player.zenRest) {
						player.getPackets().sendGameMessage("You are now using zen resting.");
						player.zenRest = true;
						end();
					} else {
						player.getPackets().sendGameMessage("You are now using normal resting.");
						player.zenRest = false;
						end();
					}
				}
				break;
			case OPTION_2:
				end();
				break;
			}
			break;
		}
	}

	@Override
	public void finish() {
		// TODO Auto-generated method stub
		
	}
	
}